package models

type SysPracticeRecord struct {
	Model
	StudentId               int   `json:"student_id" gorm:"type:int(5);comment:学生ID"`
	ObjId                   int   `json:"obj_id" gorm:"type:int(5);comment:对象ID 网课、题库、试卷主键ID"`
	ChapterId               int   `json:"chapter_id" gorm:"type:int(5);comment:章节ID"`
	ExType                  int   `json:"ex_type" gorm:"type:tinyint(1);comment:对象类型 1-网课 2-题库 3-试卷"`
	CorrectCount            int   `json:"correct_count" gorm:"int(5);default:0;comment:正确数量"`
	ErrorCount              int   `json:"error_count" gorm:"int(5);default:0;comment:错误数量"`
	CorrectRate             int   `json:"correct_rate" gorm:"type:int(4);comment:正确率"`
	StartAnswerTime         int64 `json:"start_answer_time" gorm:"int(11);default:0;comment:答题开始时间"`
	EndAnswerTime           int64 `json:"end_answer_time" gorm:"int(11);default:0;comment:答题完成时间"`
	NumberOfExercises       int   `json:"number_of_exercises" gorm:"smallint(5);comment:练习次数"`
	LastLeaveQuestionBankId int   `json:"last_leave_question_bank_id" gorm:"type:int(10);comment:离开时正在开始的题目ID"`
	Status                  int   `json:"status" gorm:"type:tinyint(1);comment:答题状态 -1未开始 1-进行中 2-已完成"`
}

func (SysPracticeRecord) TableName() string {
	return "sys_practice_record"
}
